import { post } from '@/utils/request';
import type { TagProps } from '@arco-design/web-vue/es/tag/interface';

export interface AppGroupRecord {
  id: string;
  anchor: string;
  name: string;
  apps: AppRecord[];
}

export interface AppRecord {
  id: string;
  name: string;
  icon: string;
  desc: string; // 描述
  url: string; // 跳转链接
}

type TagRecord = TagProps & {
  label: string;
};

export interface AppManagementRecord {
  id: string; // 应用ID
  name: string; // 名称
  model: string; // 模型
  icon: string; // 图标
  status: string; // 状态
  tags: TagRecord[]; // 标签
}


export function queryAppsList() {
  return post<AppGroupRecord[]>('/api/apps/list');
}
export function queryAppManagementList() {
  return post<AppManagementRecord[]>('/api/appmanagement/list');
}
